(info-initialize): If installation-directory is nil, for
authorEli Zaretskii <eliz@gnu.org>
Fri, 2 Feb 2001 18:08:54 +0000 (18:08 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 2 Feb 2001 18:08:54 +0000 (18:08 +0000)
DOS/Windows systems try looking in a sibling of
invocation-directory.

lisp/info.el

index dc9a7b7dea9f144be4da9f1ad23b24848b67885a..1add6ed522fc42d52edac9993123cf755e744497 100644 (file)
@@ -311,7 +311,19 @@ Do the right thing if the file has been compressed or zipped."
     (let ((path (getenv "INFOPATH"))
          (source (expand-file-name "info/" source-directory))
          (sibling (if installation-directory
-                      (expand-file-name "info/" installation-directory)))
+                      (expand-file-name "info/" installation-directory)
+                    (if (and (memq system-type '(ms-dos windows-nt))
+                             invocation-directory)
+                        (let ((infodir (expand-file-name
+                                        "../info/"
+                                        invocation-directory)))
+                          (if (file-exists-p infodir)
+                              infodir
+                            (setq infodir (expand-file-name
+                                           "../../../info/"
+                                           invocation-directory))
+                            (and (file-exists-p infodir)
+                                 infodir))))))
          alternative)
       (setq Info-directory-list
            (prune-directory-list